< previous page page_202 next page >

Page 202
Trim$( )
Trim$() removes both leading and trailing spaces from a string. Heres an example:
9f31265bb40b592b1929e18a47ab28e5.gif
Me.Print Trim$("  HI THERE   ")    ' Prints "HI THERE"
RTrim$( )
RTrim$() removes trailing spaces from a string. Heres an example:
9f31265bb40b592b1929e18a47ab28e5.gif
Me.Print RTrim$("  HI THERE   ")    ' Prints "   HI THERE"
LTrim$( )
LTrim$() removes leading spaces from a string. Heres an example:
9f31265bb40b592b1929e18a47ab28e5.gif
Me.Print RTrim$("  HI THERE   ")    ' Prints "HI THERE  "
Str$( )
Str$() returns a string from a numeric expression. Heres an example:
9f31265bb40b592b1929e18a47ab28e5.gif
strNumber = Str$(100)      ' Returns "100"
UCase$( )
UCase$() returns a string in all uppercase letters. Heres an example:
9f31265bb40b592b1929e18a47ab28e5.gif
Me.Print UCase$("Bill Gates") ' Returns "BILL GATES"
LCase$( )
LCase$() returns a string in all lowercase letters. Heres an example:
9f31265bb40b592b1929e18a47ab28e5.gif
Me.Print LCase$("BILL GATES") ' Returns "bill gates"
Space$( )
Space$() returns a specified amount of spaces in a string. Heres an example:
9f31265bb40b592b1929e18a47ab28e5.gif
strSpace = Space$(50)  ' strSpace will be equal to 50 spaces
Me.Print Len(strSpace) ' Prints 50

 
< previous page page_202 next page >

If you like this book, buy it!